<template>
    <div>
      <h1>这里是测试排期</h1>



        <el-table
          :data="tableData3"
          style="width: 100%"
          stripe

        >
          <template   v-for="(value,key,idx) in tableData3[1]"

                      >

            <el-table-column
              :prop="key"
              :label="tableNameMap[key]"
              width="250%"

            >
            <template slot-scope="scope">

              <li >{{scope.row[key] | filterTableErrorItem}}...{{scope.$index}}。。。{{idx}} </li>

            </template>
            </el-table-column>

          </template>
          <el-table-column
            fixed="right"
            label="操作"
            width="100">
            <template slot-scope="scope">
              <el-button @click="handleClick(scope.$index,scope.row)" type="text" size="small">查看</el-button>
              <el-button type="text" size="small">编辑</el-button>
            </template>
          </el-table-column>
        </el-table>



    </div>
</template>

<script>
    export default {
        name: "Schedule",//测试排期
      data(){
          return{
            tableData3: [{
              date: '2016-05-03',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }, {
              date: '2016-05-02',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }, {
              date: '2016-05-04',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }, {
              date: '2016-05-01',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }, {
              date: '2016-05-08',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }, {
              date: '2016-05-06',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }, {
              date: '2016-05-07',
              name: '王小虎',
              province: '上海',
              city: '普陀区',
              address: '上海市普陀区金沙江路 1518 弄',
              zip: 200333
            }],
          tableNameMap:{
              date:"日期",
              name:"名称",
            province:"省份",
            city:"地区",
            address:"详细地址",
            zip:"邮编"
          },
            //每次迭代任务
            taskItearateMapTitle:{
              project:"项目",
              itearte:"迭代",
              isComplete:"完成情况",
              testDate:"提测日期",
              deadlineDate:"交付日期",
              testDate:["2016-05-08","2016-05-09"],
              isdelay:"延期",
              remark:"备注"
            },
            //各个迭代任务
            taskItearateMapData:{

            },
          }
      },
      filters:{
        filterTableErrorItem(value){
          if(value=='2016-05-06'){
            return value = '12121'
          }else{
            return value;
          }
        }
      },
      created(){

      },
      mounted(){

      },
      methods:{
        handleClick(index,row) {
          console.log(JSON.stringify(row));
          console.log(index)
        },

      },
      computed:{

      }
    }
</script>

<style scoped>

</style>
